//收藏栏
import React, { Component } from 'react';
import {connect} from 'react-redux'
import {NavBar} from 'antd-mobile' 

class Collect extends Component {
    render() {
        return (
            <div className="collect">
                <NavBar onBack={()=>{this.props.history.goBack()}}></NavBar>
                <div className="list">
                    {
                        this.props.collectList.map((item,index)=>{
                            return(
                                <div key={index} className="item">
                                    <img src={item.icon} alt="" />
                                    <div className="text">
                                        <p>{item.name}</p>
                                        <p>{item.oldprice}</p>
                                        <p>{item.price}</p>
                                    </div>
                                </div>
                            )
                        })
                    }
                </div>
            </div>
        );
    }
}

export default connect((state)=>{
    return {
        collectList:state.collectList
    }
},(dispatch)=>{
    return{

    }
}) (Collect);